use strict;
use warnings;

package JasPerl::JspPage;

use Carp qw(croak);

sub new {
    my $class = shift;
    bless { }, $class;
}

sub init {
    $_[0]->{config} = $_[1];
}

sub get_config {
    return $_[0]->{config};
}

sub get_context {
    return $_[0]->{context};
}

sub get_init_parameter {
    return $_[0]->{config}->get_init_parameter($_[1]);
}

sub get_init_parameter_names {
    return $_[0]->{config}->get_init_parameter_names();
}

sub get_info {
}

sub service {
    my $self = shift;
    if (my $method = $self->can('_jsp_service')) {
        $self->$method(@_);
    } else {
        croak "$self: _jsp_service not defined";
    }
}

sub destroy {
}

sub DESTROY {
    $_[0]->destroy();
}

1;
